package com.cff.netty.anno.self.update;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.cff.anno.AutoDi;
import com.cff.anno.NettyServer;
import com.cff.netty.anno.NettyServerInitializerAnno;
import com.cff.netty.anno.self.NettyServerAnnoSelfInitializer;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;

@NettyServer(port="1111")
public class NettyServerAnnoSelfUpdate extends NettyServerConfigeration {
	
	@AutoDi
	NettyAnnoServerSelfUpdateHandler nettyAnnoServerSelfUpdateHandler;
	
	@Override
	public void afterStop() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public ChannelHandler getChannelHandler() {
		return nettyAnnoServerSelfUpdateHandler;
	}

	@Override
	public void beforeStart(NettyServerInitializerConfigeration nettyServerInitializerConfigeration) {
		// TODO Auto-generated method stub
		
	}
}
